package com.ytkj.digitalConstruction.dao.constructionprocess;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.ytkj.digitalConstruction.entity.constructionprocess.FlowSortTemporary;
import com.ytkj.digitalConstruction.httpbean.constructionprocess.reqbean.AddCommonInfo;
import com.ytkj.digitalConstruction.httpbean.constructionprocess.resbean.FlowProcessTemp;

/**
 * 流程排序Mapper
 * @author iking
 *
 */
@Mapper
public interface FlowSortTemporaryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(FlowSortTemporary record);

    int insertSelective(FlowSortTemporary record);

    FlowSortTemporary selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(FlowSortTemporary record);

    int updateByPrimaryKey(FlowSortTemporary record);
    
    FlowProcessTemp getAllProAndState(int flowId);
    
    /**
     * @Title: nextProcessByRoleId 
     * @Description: 将当前进程移动至下一个可操作进程，并放入流程表中
     * @param @param flowId 项目子流程编号
     * @param @param roleId 权限编号
     * @param @return -1-无权限操作，0-当前节点是最后一个节点，1-进度已调整
     * @return int
     * @throws
     */
    AddCommonInfo nextProcessByRoleId(@Param("flowId") int flowId);
    
    /**
     * @Description: 根据一堆流程id查询对应信息
     * @Title: selectListByFlowIds 
     * @param @param processIds
     * @param @return 
     * @return List<FlowSortTemporary>
     * @throws
     */
    List<FlowSortTemporary> selectListByFlowIds(String processIds);
}